// Rectangle class - Rectangle element for scene - draws and manages a Rectangle in the scene
Rectangle.prototype = new Shape();  
Rectangle.prototype.constructor=Rectangle;
function Rectangle(x,y, w, h){
	this.x = x;
	this.y = y;
	this.w = w;
	this.h = h;
	this.borderRadius = 0;	
	
	this.updateBoundary();
	this.draw = function(ctx){
		ctx.beginPath();
		if(this.borderRadius>0)
			ctx.roundRect(this.x,this.y,this.w,this.h,this.borderRadius);
		else ctx.rect(this.x,this.y,this.w,this.h);	
		ctx.closePath();
		this.executeDraw(ctx);
	};
	
	
}
